package day0307;

import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;

public class Test04 {
    public static void main(String[] args) {
        try(    FileInputStream fis = new FileInputStream("image.png");
                FileOutputStream fos= new FileOutputStream("image_cp.png"))

        {

            byte[] data =new byte[1024*10];
            while (fis.read(data)!=-1){
                fos.write(data);
            }
        } catch (IOException e) {
            e.printStackTrace();
        }
        System.out.println("完毕");
    }
}
